package com.west_traveler.tiyutoutiao.binding;

import android.databinding.BindingAdapter;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;
import com.west_traveler.tiyutoutiao.interfacess.Cans;

/**
 * Description:
 * created at 2016/12/17 16:18
 *
 * @author: 黄昌友
 */

public class Binding {

    @BindingAdapter("loadUrl")
    public static void loadImage(ImageView view, String url) {
        Picasso.with(view.getContext())
                .load(Cans.getMatchNewsPic(url))
                .into(view);
    }
}
